<%--
  Created by IntelliJ IDEA.
  User: lanouhn
  Date: 17/8/31
  Time: 17:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>接收json数据</title>

    <script src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
    <script type="text/javascript">
        function jsonsubmit() {
            $.ajax({

                url:"getjson.action",
                type:"post",
                contentType:"application/json",
                data:'{"username":"wslgn","mobile":"25761"}',
                success:function (data) {
                    console.log(data)
                }
            });
        }
    </script>

</head>
<body>

<input type="button" onclick="jsonsubmit()" value="传递json数据">


</body>
</html>
